home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
101-125
/
scopedisk118
/
whap19
/
frqlib.lzh
/
FR_User.DOC
< prev
next >
Wrap
Text File
|
1990-01-17
|
13KB
|
292 lines
kd_freq.library 1.00
File Requester User Documentation
---------------------------------
By: Khalid Aldoseri
--------------------
A File Requester is used to select a file name from the existing files on a
system, or to enter a new file name. This file requester (FR) supports all
normal features in a FR plus a lot of special features as desribed below.
File Requester Features:
1. Path Gadget: (string gadget at top of window)
This contains the path to the currently displayed directory. You can
enter any directory name directly into it if you like by clicking in
it and editing the text there.
Notes:
If you insert a disk into a drive that has been selected in the Path
gadget the disk's directory will automatically be read and displayed.
If the current disk is removed from the drive, the FR will clear the file
list and bring up the device name (not the old disk name) in the Path
gadget. This means that you can take a disk out of the drive and insert
a new one and the FR will keep up with you if the current device is the
one that you are using. This only works for devices DF0: to DF3:.
If the user enters the name of an actual file into the Path gadget, then
the name will be split into its path and filename components and handled
accordingly.
2. File Gadget: (string gadget below Path gadget)
This contains the currently selected file. You can manually edit the
filename by clicking in it and editing the text. It also supports the
following features:
- Auto-Find:
If you type any filename in the File gadget and hit return, the
filename closest to the one you typed in will be shown at the top
of the file list.
- Auto-Complete:
If you type the first few characters of a file name and end the name
with either a '?' or a '/' and hit return, the first matching filename
from the file list will be used to complete the filename in the File
gadget.
- Auto-Activate:
You can immediately type in a filename if no string gadget is active.
This will automatically activate the File gadget.
3. File List: (set of gadgets that display the file list)
To select any file just click on it once and it will show up in the File
gadget, unless the entry you clicked on was a directory, in which case
the FR will automatically display the directory selected. The display
format is:
test.file * 11381 09-Dec-89 11:50 ----rwed
| | | | | |
filename | size date time protection
filenote bits
marker
If the file entry is a directory, it will be displayed in a different
color and it will display '-dir-' instead of the file size. The actual
data displayed depends on the size of the window, refer to the section
on 'Resize Gadget' for details.
Double-clicking on a file name will simulate the OK gadget.
If the entry has a filenote marker, then that file has a comment (or
file note). To see this comment, click on that entry and the comment
will be displayed in its place in the file list. To remove the note
from the display just click on the prop gadget.
Clicking the right mouse button while the pointer is on the file list
area will cycle through one of three modes:
a. Normal mode: File list shows the selected directory.
b. Device list: File list shows the currently mounted devices
by volume name.
c. Assign list: File list shows all assigns.
4. OK Gadget: (bottom left of window)
Click on this gadget when you're happy with the directory/filename you
have selected. This tells the calling program that you accept these
selections. Hitting the TAB key also has the same effect.
5. Cancel Gadget: (bottom right of window)
This cancels the file requester and aborts the filename selection.
Hitting the 'Esc' key also has the same effect.
6. Close Window Gadget: (standard close window gadget)
Does the same as 'Cancel Gadget'.
7. Wild Gadget: (string gadget below File List)
The pattern entered in this gadget controls what files are displayed
in the File List. This take a standard AmigaDOS wildcard pattern and
applies it to the file list as files are being read from the device.
This defaults to '#?'.
Supported wildcards in pattern:
1. Standard AmigaDOS Wildcards:
--------------------------------
? Matches any single character
#p Match any number of occurences of the pattern p
% Matches the null string
() Make a group of characters into a single pattern
| The OR operator
' Disable wildcard interpretation of next character
(unless it is an extended wildcard as shown below.)
2. Extended Wildcards:
-----------------------
These are wildcards not supported by the standard AmigaDOS
convention, but expand it to make it more versatile.
'd Matches any single digit. (0 to 9)
'a Matches any single alpha character. (a to z)
'n Matches any single alphanumeric character.
For examples of standard wildcard usage, look up any AmigaDOS
tutorial book.
Examples of extended wildcards:
Pattern Matching possibilities
------- ----------------------
test'n test0, test1, test9, testa, testA, testz, testZ
test'd test0, test1, test9
test'a testa, testA, testz, testZ
test 'd test 1, test 2, test 9
test#'d test1, test100, test10234
#'a#'d a1, ab12, abc1, abc123, adks34234
(matches any string with some or no alpha characters,
then some or no digits.)
#'a'd#'d.c a1.c, a203.c, 100.c, 1.c, adsdfs931234.c
(matches any string that starts with some of no alpha
characters, then at least 1 or more digits, and ends
with .c)
8. Scroll Up: (up-arrow above the proportional gadget)
This scrolls the file list up at a slow speed if you click it
with the left mouse button, or it will scroll the file list down
if you click it with the right mouse button. If you hold down both
buttons at the same time, the right button will take priority.
9. Scroll Down: (down-arrow below the proportional gadget)
Same as above expect that it moves the list a lot faster and the mouse
button directions are reversed.
10. Prop Gadget: (proportional gadget across the center of the window)
This gadget represents the position of the currently displayed files
in the File List in relation to the total files in the selected
directory. You can move around the list by holding down the Prop
Gadget with the left mouse button and moving the gadget up and down.
If you click the right mouse button over the Prop gadget it will move
to the top of the file list, unless it is already at the top in which
case it will move to the bottom of the list.
11. Parent: (up-arrow to the left of the Path string gadget)
If you click on this gadget with the left mouse button, the FR will
display the parent of the current directory, if there is one.
If you click on it with the right button, it will display the root
directory of the currently selected device.
12. Disk Gadgets: (set of disk icons across the left of the window)
These are disk icons that represent the currently mounted storage
devices in the system. If you click on any disk icon with the left
mouse button the root directory of the selected device will be
displayed. You can scroll through the mounted disk list via the
'Disk Scroll Up' and 'Disk Scroll Down' arrow gadgets.
If you click on the right mouse button over any disk icon, you will get
info about the device displayed in the file list area. The file list is
not erased from memory, you just have to click on the prop gadget or the
up or down scroll gadgets and the file list will reappear.
Note: If there isn't enough space to display 4 lines in the file list
area, this function will not work.
13. Disk Scroll Up: (up-arrow in the top left-hand corner)
This scrolls the list of 'mounted disks' up. It only works if the
number of available devices is too big to fit in the current window.
14. Disk Scroll Down: (down-arrow in the top left-hand corner)
Same as above, but scrolls the list down.
15. Resize Gadget: (bottom 5 lines across window)
The FR is resizable by the user. The resize gadget is marked by a
tiny arrow in the bottom-right corner, but it actually occupies the
bottom 5 lines across the window. Just click there and resize
the window. The whole requester will resize accordingly.
Resizing the window horizontally will make space for more info about
the file to be display. This is based on the following method:
The FR checks to see the longest file name in the list and it
fits in whatever extra data it can starting from the file date, file
time and finally protection bits.
16. Next Directory: (gadget with 'Next' in it, left top corner)
The Next Directory gadget stores the current directory and all its
files into a temporary buffer and will then provide you with a new work
buffer to use. You can then go back to that old directory immediately by
clicking on the Next gadget until you get back to it. The directory is
displayed immediately and does not have to be read back again from the
drive. This can be repeated for upto 5 diretories stored at the same
time. When you use the 'Next' gadget, the current buffer # is displayed
at the bottom of the FR. If the buffer is a new one, it will display
"Buffer # x (empty)".
The following data is stored in each buffer:
- The full path name of the directory.
- All the files in the directory along with their sizes, date,
time and protection settings.
- The number of files and directories in the directory.
- The position where the scroll bar was in. (This means that
when you return to a directory, the file list will be exactly
where you left it.)
- The current filename in the File gadget.
17. Preset Resize Gadgets: (3 small box gadgets left of 'Scroll Down Gadget')
These gadgets immediately resize the FR to small, normal, and full screen
respectively from left to right. This action will also automatically
center the FR in the screen. If the FR is already at the requested size,
then this request will be ignored.
18. No .info Gadget: (small box with 'I' in it, above 'Cancel' gadget)
If the No .info Gadget is active, it will have two lines drawn diagonally
across it. This tells the FR not to display files ending with '.info' in
the file list. This gadget is actually a toggle switch.
Notes:
- The FR stays 'live' while reading the directory, i.e. you can abort the
directory read at any time by selecting a new directory. You can also
scroll through the file list or resize the window and the FR will keep
on reading the directory.
- Each buffer used allocates memory in 2k chunks as it needs them.
Average memory usage is 70 files for a 2k buffer. The only limit
to number of files per directory is available memory. If the FR
runs out of memory, it will inform the user that the directory
was truncated.
- The FR will always try to come back up where it was previously, and in
the same size. If it can't do that, it will move/resize to attempt to
be as close as possible to what it was.
- Keyboard commands: (These only work if no string gadget is active)
Enter or CR Activate Path gadget.
Space Bar Active Wildcard gadget.
Escape key Cancel requester.
Tab key OK requester.
- Error Messages:
If the FR cannot access a device, it will report one of the following
errors:
- No disk in drive. (drive empty)
- Not a DOS Disk. (bad or kickstart disk)
- Can't find Path. (bad device or directory name)
- DOS Error: xxx. (where xxx is the DOS error number.)
- Please send any comments, suggestions, bug reports, etc. to me either on
Compuserve (75166,2531) or to:
/-------------------\
| Khalid Aldoseri |
| P.O. Box 3300 |
| Manama, Bahrain. |
| Tel: (973) 690066 |
| Fax: (973) 694777 |
\-------------------/
Compuserve 75166,2531
Copyright 1990 Khalid Aldoseri.
16 January 1990.